NcApi
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
NcApi.h File Reference
#include <stdint.h>

Data Structures

struct  NcApiNeighbor
 
struct  NcApiSendUnackMessage
 Definition of message type "0x02: Unacknowledged Packet". More...
 
struct  NcApiSendUnackParams
 Parameters for the function handling message type "0x02: Unacknowledged Packet". More...
 
struct  NcApiSendAckMessage
 Definition of message type "0x03: Acknowledged Packet". More...
 
struct  NcApiSendAckParams
 Parameters for the function handling message type "0x03: Acknowledged Packet". More...
 
struct  NcApiNodeInfoRequestMessage
 Definition of message type "0x08: Node Info Request". More...
 
struct  NcApiNodeInfoParams
 Parameters for the function handling message type "0x08: Node Info Request". More...
 
struct  NcApiNeighborListRequestMessage
 Definition of message type "0x09: Neighbor List Request". More...
 
struct  NcApiNeighborListRequestParams
 Parameters for the function handling message type "0x09: Neighbor List Request". More...
 
struct  NcApiNetCmdMessage
 Definition of message type "0x0a: Network Command". More...
 
struct  NcApiNetCmdParams
 Parameters for the function handling message type "0x0a: Network Command". More...
 
struct  NcApiWesCmdMessage
 Definition of message type "0x10: WES Command". More...
 
struct  NcApiWesCmdParams
 Parameters for the function handling message type "0x10: WES Command". More...
 
struct  NcApiWesResponseMessage
 
struct  NcApiWesResponseParams
 Parameters for the function handling message type "0x11: WES Setup Response". More...
 
struct  NcApiAltCmdMessage
 Definition of message type "0x20: ALT command". More...
 
struct  NcApiAltCmdParams
 Parameters for the function handling message type "0x20: ALT command". More...
 
struct  NcApiHostAckNack
 Parameters for the function handling message type "0x50: Acknowledge for previously sent packet"
Parameters for the function handling message type "0x51: Non-Acknowledge for previously sent packet". More...
 
struct  NcApiHostData
 Parameters for the function handling message type "0x52: Host Data". More...
 
struct  NcApiHostDataHapa
 Parameters for the function handling message type "0x53: Host Data HAPA". More...
 
struct  NcApiHostUappData
 Parameters for the function handling message type "0x54: Host Data Unacknowledged". More...
 
struct  NcApiHostUappDataHapa
 Parameters for the function handling message type "0x55: Host Data HAPA Unacknowledged". More...
 
struct  NcApiNodeInfoReply
 Parameters for the function handling message type "0x58: Node Info Reply". More...
 
struct  NcApiNeighborListReply
 Parameters for the function handling message type "0x59: Neighbor List Reply". More...
 
struct  NcApiNetCmdReply
 Parameters for the function handling message type "0x5a: Network command response". More...
 
struct  NcApiWesStatus
 Parameters for the function handling message type "0x60: WES Status". More...
 
struct  NcApiWesSetupRequest
 Parameters for the function handling message type "0x61: WES Setup Request". More...
 
struct  NcApiRxHandlers
 Set of application callbacks to handle any received messages. Each callback is optional allowing the application to register specific callbacks only for the message types of particular interest. More...
 
struct  NcApi
 This is the definition of a global structure holding various information, in particular the RX and TX buffers for a specific UART, and tha set of application callbacks to handle any received messages. These data are managed by the NcApi module, and as such the fields are considered internal to NcApi. More...
 

Macros

#define NCAPI_TXBUFFER_SIZE   32
 Default TX buffer size. Can be defined by the application. More...
 
#define NCAPI_MAX_PAYLOAD_LENGTH   (NCAPI_TXBUFFER_SIZE-5)
 
#define NCAPI_RXBUFFER_SIZE   255
 Default RX buffer size. Can be defined by the application. More...
 
#define WES_APPSETTINGS_LENGTH   24
 Definition of message type "0x11: WES Setup Response". More...
 

Typedefs

typedef struct NcApiNeighbor tNcApiNeighbor
 
typedef struct NcApiSendUnackMessage tNcApiSendUnackMessage
 Definition of message type "0x02: Unacknowledged Packet". More...
 
typedef struct NcApiSendUnackParams tNcApiSendUnackParams
 Parameters for the function handling message type "0x02: Unacknowledged Packet". More...
 
typedef struct NcApiSendAckMessage tNcApiSendAckMessage
 Definition of message type "0x03: Acknowledged Packet". More...
 
typedef struct NcApiSendAckParams tNcApiSendAckParams
 Parameters for the function handling message type "0x03: Acknowledged Packet". More...
 
typedef struct NcApiNodeInfoRequestMessage tNcApiNodeInfoRequestMessage
 Definition of message type "0x08: Node Info Request". More...
 
typedef struct NcApiNodeInfoParams tNcApiNodeInfoParams
 Parameters for the function handling message type "0x08: Node Info Request". More...
 
typedef struct NcApiNeighborListRequestMessage tNcApiNeighborListRequestMessage
 Definition of message type "0x09: Neighbor List Request". More...
 
typedef struct NcApiNeighborListRequestParams tNcApiNeighborListRequestParams
 Parameters for the function handling message type "0x09: Neighbor List Request". More...
 
typedef struct NcApiNetCmdMessage tNcApiNetCmdMessage
 Definition of message type "0x0a: Network Command". More...
 
typedef struct NcApiNetCmdParams tNcApiNetCmdParams
 Parameters for the function handling message type "0x0a: Network Command". More...
 
typedef struct NcApiWesCmdMessage tNcApiWesCmdMessage
 Definition of message type "0x10: WES Command". More...
 
typedef struct NcApiWesCmdParams tNcApiWesCmdParams
 Parameters for the function handling message type "0x10: WES Command". More...
 
typedef struct NcApiWesResponseMessage tNcApiWesResponseMessage
 
typedef struct NcApiWesResponseParams tNcApiWesResponseParams
 Parameters for the function handling message type "0x11: WES Setup Response". More...
 
typedef struct NcApiAltCmdMessage tNcApiAltCmdMessage
 Definition of message type "0x20: ALT command". More...
 
typedef struct NcApiAltCmdParams tNcApiAltCmdParams
 Parameters for the function handling message type "0x20: ALT command". More...
 
typedef struct NcApiHostAckNack tNcApiHostAckNack
 Parameters for the function handling message type "0x50: Acknowledge for previously sent packet"
Parameters for the function handling message type "0x51: Non-Acknowledge for previously sent packet". More...
 
typedef struct NcApiHostData tNcApiHostData
 Parameters for the function handling message type "0x52: Host Data". More...
 
typedef struct NcApiHostDataHapa tNcApiHostDataHapa
 Parameters for the function handling message type "0x53: Host Data HAPA". More...
 
typedef struct NcApiHostUappData tNcApiHostUappData
 Parameters for the function handling message type "0x54: Host Data Unacknowledged". More...
 
typedef struct NcApiHostUappDataHapa tNcApiHostUappDataHapa
 Parameters for the function handling message type "0x55: Host Data HAPA Unacknowledged". More...
 
typedef struct NcApiNodeInfoReply tNcApiNodeInfoReply
 Parameters for the function handling message type "0x58: Node Info Reply". More...
 
typedef struct NcApiNeighborListReply tNcApiNeighborListReply
 Parameters for the function handling message type "0x59: Neighbor List Reply". More...
 
typedef struct NcApiNetCmdReply tNcApiNetCmdReply
 Parameters for the function handling message type "0x5a: Network command response". More...
 
typedef struct NcApiWesStatus tNcApiWesStatus
 Parameters for the function handling message type "0x60: WES Status". More...
 
typedef struct NcApiWesSetupRequest tNcApiWesSetupRequest
 Parameters for the function handling message type "0x61: WES Setup Request". More...
 
typedef void(* pfnNcApiReadCallback) (uint8_t n, uint8_t *msg, uint8_t msgLength)
 Application provided function that NcApi calls whenever any valid NeocCortec messages has been received. More...
 
typedef void(* pfnNcApiHostAckCallback) (uint8_t n, tNcApiHostAckNack *m)
 Application provided functions that NcApi calls when a
message type "0x50: Acknowledge for previously sent packet" is received, or a
message type "0x51: Non-Acknowledge for previously sent packet" is received. More...
 
typedef void(* pfnNcApiHostDataCallback) (uint8_t n, tNcApiHostData *m)
 Application provided function that NcApi calls when a
message type "0x52: Host Data" is received. More...
 
typedef void(* pfnNcApiHostDataHapaCallback) (uint8_t n, tNcApiHostDataHapa *m)
 Application provided function that NcApi calls when a
message type "0x53: Host Data HAPA" is received. More...
 
typedef void(* pfnNcApiHostUappDataCallback) (uint8_t n, tNcApiHostUappData *m)
 Application provided function that NcApi calls when a
message type "0x54: Host Data Unacknowledged" is received. More...
 
typedef void(* pfnNcApiHostUappDataHapaCallback) (uint8_t n, tNcApiHostUappDataHapa *m)
 Application provided function that NcApi calls when a
message type "0x55: Host Data HAPA Unacknowledged" is received. More...
 
typedef void(* pfnNcApiNodeInfoReplyCallback) (uint8_t n, tNcApiNodeInfoReply *m)
 Application provided function that NcApi calls when a
message type "0x58: Node Info Reply" is received. More...
 
typedef void(* pfnNcApiNeighborListReplyCallback) (uint8_t n, tNcApiNeighborListReply *m)
 Application provided function that NcApi calls when a
message type "0x59: Neighbor List Reply" is received. More...
 
typedef void(* pfnNcApiNetCmdResponseCallback) (uint8_t n, tNcApiNetCmdReply *m)
 Application provided function that NcApi calls when a
message type "0x5a: Network Command Reply" is received. More...
 
typedef void(* pfnNcApiWesStatusCallback) (uint8_t n, tNcApiWesStatus *m)
 Application provided function that NcApi calls when a
message type "0x60: WES Status" is received. More...
 
typedef void(* pfnNcApiWesSetupRequestCallback) (uint8_t n, tNcApiWesSetupRequest *m)
 Application provided function that NcApi calls when a
message type "0x61: WES Setup Request" is received. More...
 
typedef struct NcApiRxHandlers tNcApiRxHandlers
 Set of application callbacks to handle any received messages. Each callback is optional allowing the application to register specific callbacks only for the message types of particular interest. More...
 
typedef struct NcApi tNcApi
 This is the definition of a global structure holding various information, in particular the RX and TX buffers for a specific UART, and tha set of application callbacks to handle any received messages. These data are managed by the NcApi module, and as such the fields are considered internal to NcApi. More...
 

Enumerations

enum  NcApiErrorCodes {
  NCAPI_OK = 0, NCAPI_ERR_NODEID = 1, NCAPI_ERR_DESTPORT = 2, NCAPI_ERR_PAYLOAD = 3,
  NCAPI_ERR_ENQUEUED = 4, NCAPI_ERR_NULLPAYLOAD = 5, NCAPI_ERR_NOARGS = 6
}
 
enum  NcApiWesCmdValues { NCAPI_WES_STOP = 0, NCAPI_WES_STARTSERVER = 1, NCAPI_WES_REQUESTSTATUS = 2, NCAPI_WES_STARTCLIENT = 3 }
 
enum  NcApiWesStatusValues { NCAPI_WES_STOPPED = 0, NCAPI_WES_SERVERRUNNING = 1, NCAPI_WES_CLIENTRUNNING = 2 }
 
enum  NcApiNodeType { NCAPI_NODE_TYPE_NC2400 = 1, NCAPI_NODE_TYPE_NC1000 = 2, NCAPI_NODE_TYPE_NC0400 = 3 }
 
enum  NcApiAltCmdValues { NCAPI_ALT_STOP = 0, NCAPI_ALT_START = 1 }
 
enum  NcApiNetCmdValues {
  NCAPI_NetCmd_ACK = 0, NCAPI_NetCmd_NACK = 1, NCAPI_NetCmd_Hibernate = 2, NCAPI_NetCmd_Wake = 3,
  NCAPI_NetCmd_Wes = 5
}
 

Functions

void NcApiSupportMessageReceived (uint8_t n, void *callbackToken, uint8_t *msg, uint8_t msgLength)
 Application provided function that NcApi calls after it has succesfully received a full message. More...
 
void NcApiCallbackNwuActive (uint8_t n)
 Callback from the application into NcApi whenever nWU becomes active. More...
 
void NcApiCtsActive (uint8_t n)
 Callback from the application into NcApi whenever CTS becomes active. More...
 
void NcApiSupportTxData (uint8_t n, uint8_t *finalMsg, uint8_t finalMsgLength)
 Application provied function that NcApi calls if there is any pending data to be written to the UART. More...
 
void NcApiSupportMessageWritten (uint8_t n, void *callbackToken, uint8_t *finalMsg, uint8_t finalMsgLength)
 Application provided function that NcApi calls after it has succesfully written the message. More...
 
void NcApiRxData (uint8_t n, uint8_t byte)
 Callback from the application into NcApi whenever a byte is received on the UART. More...
 
void NcApiInit ()
 API provided function that initializes the allocated instances of tNcApi. More...
 
NcApiErrorCodes NcApiSendUnacknowledged (uint8_t n, tNcApiSendUnackParams *args)
 API provided function that may be called when a
message type "0x02: Unacknowledged Packet" shall be sent. More...
 
NcApiErrorCodes NcApiSendAcknowledged (uint8_t n, tNcApiSendAckParams *args)
 API provided function that may be called when a
message type "0x03: Acknowledged Packet" shall be sent. More...
 
NcApiErrorCodes NcApiSendNodeInfoRequest (uint8_t n, tNcApiNodeInfoParams *args)
 API provided function that may be called when a
message type "0x08: Node Info Request" shall be sent. More...
 
NcApiErrorCodes NcApiSendNeighborListRequest (uint8_t n, void *callbackToken)
 API provided function that may be called when a
message type "0x09: Neighbor List Request" shall be sent. More...
 
NcApiErrorCodes NcApiSendNetCmd (uint8_t n, tNcApiNetCmdParams *args)
 API provided function that may be called when a
message type "0x0a: Network Command" shall be sent. More...
 
NcApiErrorCodes NcApiSendWesCmd (uint8_t n, tNcApiWesCmdParams *args)
 API provided function that may be called when a
message type "0x10: WES Command" shall be sent. More...
 
NcApiErrorCodes NcApiSendWesResponse (uint8_t n, tNcApiWesResponseParams *args)
 API provided function that may be called when a
message type "0x11: WES Setup Response" shall be sent. More...
 
NcApiErrorCodes NcApiSendAltCmd (uint8_t n, tNcApiAltCmdParams *args)
 Sends one AltCmd message. More...
 
void NcApiExecuteCallbacks (uint8_t n, uint8_t *msg, uint8_t msgLength)
 API provided function that may be called to the relevant callback functions for a received message. More...
 
void NcApiCancelEnqueuedMessage (uint8_t n)
 Cancels any enqueued message. More...
 
NcApiErrorCodes NcApiSendRaw (uint8_t n, tNcApiSendAckParams *args)
 (This function is not supported) More...
 

Variables

tNcApi g_ncApi []
 Application defined array of NcApi instances in use. More...
 
uint8_t g_numberOfNcApis
 Application defined number of elements in the g_ncApi array. More...
 

Typedef Documentation

typedef void(* pfnNcApiHostAckCallback) (uint8_t n, tNcApiHostAckNack *m)

The appropriate function is called when a HostAck or HostNAck message has been received for a previously sent payload package. The callback function delivers a pointer to a struct containing the relevant information.

Parameters
nIndex of tNcApi instance that the message was received from
mStrongly typed message
typedef void(* pfnNcApiHostDataCallback) (uint8_t n, tNcApiHostData *m)

The callback is issued when the modules receive payload data, that requires acknowledge, from another module in the NEOCORTEC mesh network. The callback function delivers a pointer to a struct containing the relevant information.

Parameters
nIndex of tNcApi instance that the message was received from
mStrongly typed message
typedef void(* pfnNcApiHostDataHapaCallback) (uint8_t n, tNcApiHostDataHapa *m)

The callback is issued when the modules receive payload data, that requires acknowledge, from another module in the NEOCORTEC mesh network which has been configured to use the High Precision Packet Age feature (HAPA). The callback function delivers a pointer to a struct containing the relevant information.

Parameters
nIndex of tNcApi instance that the message was received from
mStrongly typed message
typedef void(* pfnNcApiHostUappDataCallback) (uint8_t n, tNcApiHostUappData *m)

The callback is issued when the modules receive payload data, that NOT requires acknowledge, from another module in the NEOCORTEC mesh network. The callback function delivers a pointer to a struct containing the relevant information.

Parameters
nIndex of tNcApi instance that the message was received from
mStrongly typed message
typedef void(* pfnNcApiHostUappDataHapaCallback) (uint8_t n, tNcApiHostUappDataHapa *m)

The callback is issued when the modules receive payload data, that requires acknowledge, from another module in the NEOCORTEC mesh network which has been configured to use the High Precision Packet Age feature (HAPA). The callback function delivers a pointer to a struct containing the relevant information.

Parameters
nIndex of tNcApi instance that the message was received from
mStrongly typed message
typedef void(* pfnNcApiNeighborListReplyCallback) (uint8_t n, tNcApiNeighborListReply *m)
Parameters
nIndex of tNcApi instance that the message was received from
mStrongly typed message
typedef void(* pfnNcApiNetCmdResponseCallback) (uint8_t n, tNcApiNetCmdReply *m)
Parameters
nIndex of tNcApi instance that the message was received from
mStrongly typed message
typedef void(* pfnNcApiNodeInfoReplyCallback) (uint8_t n, tNcApiNodeInfoReply *m)
Parameters
nIndex of tNcApi instance that the message was received from
mStrongly typed message
typedef void(* pfnNcApiReadCallback) (uint8_t n, uint8_t *msg, uint8_t msgLength)

This function will deliver a byte array containing the received raw UART frame.
It is normally not necessary to register for this callback, as there are other callbacks which are specific to the various types of application data.

Parameters
nIndex of tNcApi instance that the message was received from
msgPointer to the message
msgLengthMessage length in bytes
typedef void(* pfnNcApiWesSetupRequestCallback) (uint8_t n, tNcApiWesSetupRequest *m)
Parameters
nIndex of tNcApi instance that the message was received from
mStrongly typed message
typedef void(* pfnNcApiWesStatusCallback) (uint8_t n, tNcApiWesStatus *m)
Parameters
nIndex of tNcApi instance that the message was received from
mStrongly typed message
typedef struct NcApi tNcApi
typedef struct NcApiHostData tNcApiHostData
typedef struct NcApiNeighbor tNcApiNeighbor

Enumeration Type Documentation

Enumerator
NCAPI_ALT_STOP 

Stop.

NCAPI_ALT_START 

Start server.

Enumerator
NCAPI_OK 

Success.

NCAPI_ERR_NODEID 

NodeId cannot be 0.

NCAPI_ERR_DESTPORT 

Port must be [0..3].

NCAPI_ERR_PAYLOAD 

No payload supplied.

NCAPI_ERR_ENQUEUED 

There is already one pending message waiting to be written to the UART.

NCAPI_ERR_NULLPAYLOAD 

Payload length supplied but no payload.

NCAPI_ERR_NOARGS 

No arguments pointer.

Enumerator
NCAPI_NetCmd_ACK 

ACK.

NCAPI_NetCmd_NACK 

NACK.

NCAPI_NetCmd_Hibernate 

Hibernate.

NCAPI_NetCmd_Wake 

Wake.

NCAPI_NetCmd_Wes 

WES.

Enumerator
NCAPI_NODE_TYPE_NC2400 

Hardware is NC2400.

NCAPI_NODE_TYPE_NC1000 

Hardware is NC1000.

NCAPI_NODE_TYPE_NC0400 

Hardware is NC0400.

Enumerator
NCAPI_WES_STOP 

Stop.

NCAPI_WES_STARTSERVER 

Start server.

NCAPI_WES_REQUESTSTATUS 

Request status.

NCAPI_WES_STARTCLIENT 

Start client.

Enumerator
NCAPI_WES_STOPPED 

Stopped.

NCAPI_WES_SERVERRUNNING 

Server is running.

NCAPI_WES_CLIENTRUNNING 

Client is running.

Function Documentation

void NcApiCallbackNwuActive ( uint8_t  n)
Parameters
nIndex of tNcApi instance that the nWU interrupt relates to
void NcApiCancelEnqueuedMessage ( uint8_t  n)
Parameters
nIndex of tNcApi instance where the message should be dequeued
void NcApiCtsActive ( uint8_t  n)

This is a function inside the API, which shall be called each time the CTS line on the UART transitions to active (low) state. As such, a monitor for the particular pin on the controller must be present, such that the API can be made aware that the CTS is active. There is no need for any action when the CTS line transitions to passive (high).

Parameters
nIndex of tNcApi instance that the CTS interrupt relates to
void NcApiExecuteCallbacks ( uint8_t  n,
uint8_t *  msg,
uint8_t  msgLength 
)

The Application typically calls this function from NcApiSupportMessageReceived() once a message has successfully been received from the module, and the relevant callback function in the Application vill then be called, if it has previously been registered.

Parameters
nIndex of tNcApi instance that message was written to
msgPointer to the message
msgLengthMessage length in bytes
void NcApiInit ( )
Remarks
This function must be called once to initialize the API.
void NcApiRxData ( uint8_t  n,
uint8_t  byte 
)

This is a function inside the API, which shall be called each time a byte is received on the UART. The byte shall be included as an argument when the function is called.

Parameters
nIndex of tNcApi instance that the byte relates to
byteThe byte received
NcApiErrorCodes NcApiSendAcknowledged ( uint8_t  n,
tNcApiSendAckParams args 
)

This function can be used to send payload data to another node inside the mesh network. The message will be acknowledged.

Parameters
nIndex of tNcApi instance that the message should be sent via
argsPointer to instance of the argument structure that holds the parameters
Returns
0 upon success. Anything else is an error
NcApiErrorCodes NcApiSendAltCmd ( uint8_t  n,
tNcApiAltCmdParams args 
)
Parameters
nIndex of tNcApi instance that the message should be sent via
argsPointer to instance of the argument structure that holds the parameters
Returns
0 upon success. Anything else is an error
NcApiErrorCodes NcApiSendNeighborListRequest ( uint8_t  n,
void *  callbackToken 
)
Parameters
nIndex of tNcApi instance that the message should be sent via
argsPointer to instance of the argument structure that holds the parameters
Returns
0 upon success. Anything else is an error
NcApiErrorCodes NcApiSendNetCmd ( uint8_t  n,
tNcApiNetCmdParams args 
)
Parameters
nIndex of tNcApi instance that the message should be sent via
argsPointer to instance of the argument structure that holds the parameters
Returns
0 upon success. Anything else is an error
NcApiErrorCodes NcApiSendNodeInfoRequest ( uint8_t  n,
tNcApiNodeInfoParams args 
)
Parameters
nIndex of tNcApi instance that the message should be sent via
argsPointer to instance of the argument structure that holds the parameters
Returns
0 upon success. Anything else is an error
NcApiErrorCodes NcApiSendRaw ( uint8_t  n,
tNcApiSendAckParams args 
)
NcApiErrorCodes NcApiSendUnacknowledged ( uint8_t  n,
tNcApiSendUnackParams args 
)

This function can be used to send payload data to another node inside the mesh network. The message will not be acknowledged.

Parameters
nIndex of tNcApi instance that the message should be sent via
argsPointer to instance of the argument structure that holds the parameters
Returns
0 upon success. Anything else is an error
NcApiErrorCodes NcApiSendWesCmd ( uint8_t  n,
tNcApiWesCmdParams args 
)
Parameters
nIndex of tNcApi instance that the message should be sent via
argsPointer to instance of the argument structure that holds the parameters
Returns
0 upon success. Anything else is an error
NcApiErrorCodes NcApiSendWesResponse ( uint8_t  n,
tNcApiWesResponseParams args 
)
Parameters
nIndex of tNcApi instance that the message should be sent via
argsPointer to instance of the argument structure that holds the parameters
Returns
0 upon success. Anything else is an error
void NcApiSupportMessageReceived ( uint8_t  n,
void *  callbackToken,
uint8_t *  msg,
uint8_t  msgLength 
)

The API will call this function once a message has successfully been received in full from the module. This can be used by the application layer to initiate invocation of the relevant callback function via the function NcApiExecuteCallbacks().

Parameters
nIndex of tNcApi instance that message was written to
callbackTokenApplication provided context / token / tag
msgPointer to the message
msgLengthMessage length in bytes
void NcApiSupportMessageWritten ( uint8_t  n,
void *  callbackToken,
uint8_t *  finalMsg,
uint8_t  finalMsgLength 
)

The API will call this function once a message has successfully been written in full to the module. This can be used by the application layer to check that a previous request to send a message was completed successfully.

Parameters
nIndex of tNcApi instance that message was written to
callbackTokenApplication provided context / token / tag
finalMsgPointer to the message
finalMsgLengthMessage length in bytes
void NcApiSupportTxData ( uint8_t  n,
uint8_t *  finalMsg,
uint8_t  finalMsgLength 
)

The API will call this function to send data to the UART. The function is called with a pointer to the actual data to be written. The function shall implement the necessary code required to output the data to the UART.

Parameters
nIndex of tNcApi instance that the data should be written to, ie. which UART
finalMsgPointer to the buffer
finalMsgLengthNumber of bytes to be written

Variable Documentation

tNcApi g_ncApi[]
uint8_t g_numberOfNcApis